import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/Login.vue'
import Home from '@/components/Home.vue'
import Welcome from '@/components/welcome.vue'
import User from '../components/user.vue'

Vue.use(Router)

export default new Router({
  routes: [
    // {
    //   path: '/',
    //   name: 'Login',
    //   component: Login
    // },
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path: '/',
      name: 'Home',
      component: Home,
      redirect: {path: 'welcome'},
      children:[
        {
          path: 'welcome',
          name: 'Welcome',
          component: Welcome
        },
        {
          path: 'user',
          name: 'User',
          component: User
        }
      ]
    }
  ]
})
